package com.itheima.pojo;


import com.itheima.anno.Anno1;

//import javax.servlet.annotation.WebServlet;

@Anno1("1")
//@WebServlet("/Student")
public class Student {
    // 如果你输入了地址：/Student tomcat服务器就知道你要访问当前的servlet

    public Student(String name) {
        this.name = name;
    }

    public Student() {
    }

    private Student(String name, int age, String gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;
    }


    private String name;
    int age;
    public String gender;


    public void study() {
        System.out.println(" student study");
    }

    private int add(int a, int b) {
        return a + b;
    }

    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", gender='" + gender + '\'' +
                '}';
    }
}
